@echo off
setlocal
set branch=%1
if "%branch%"=="" (
   echo usage:
   echo     %~n0 trunk
   echo     %~n0 branchname
   echo.
   echo If a branchname is specified, the branches/ path component will be added by %~n0
   goto done
)

svn checkout --depth=empty http://svn.mitra.com/svnrepo
cd svnrepo
@for %%m in (impax-core impax impax-migration mitk agfahc-pacs-services-setup impax-client-generic-imaging-interface impax-client-study-image-viewer impax-client-setup) do (
     svn update --depth=empty %%m
     pushd %%m
     if not "%branch%"=="trunk" (
        svn update --depth=empty branches
        cd branches
     )
     svn update --depth=empty %branch%
     popd
)

:done